home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1985 October / 64er_Magazin_85-10_1985_Markt__Technik_de.d64 / xref simons bas. (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  184 lines

  1. 10 rem*********************************
  2. 20 rem* programmname : xref           *
  3. 30 rem*     c-64                      *
  4. 40 rem*     floppy 1541 o. aehnliche  *
  5. 50 rem*     drucker (z.b. mps 801)    *
  6. 60 rem* von stefan becker             *
  7. 70 rem*********************************
  8. 80 clr:goto150
  9. 90 get#1,a$:x=asc(a$+n$):if(64andst)=0thenreturn
  10. 100 close1:ifpathenpa=0:goto520
  11. 110 goto960
  12. 120 gosub90:x1=x:gosub90:x=x1+256*x:return
  13. 130 ifsp<obandva<obandps<obthenreturn:rem*** grenzen erreicht ? ***
  14. 140 print:print"[194]itte die [214]ariable ob in [218]eile 150 vergroessern.":goto1310
  15. 150 ob=500:dimsp$(ob),ps$(ob),va$(ob)
  16. 160 rem*** ob ist obergrenze der anzahl der spruenge und variablen ***
  17. 170 poke53280,6:poke53281,6
  18. 180 n$=chr$(0)
  19. 190 le$="                                                  "
  20. 200 printchr$(147)chr$(9)chr$(14)chr$(8)chr$(144);
  21. 210 print"          [195]ross-[210]eferenz-[204]ister         "
  22. 220 print"[193]usgabe auf ":print"[194][146]ildschirm oder [196][146]rucker[145][145][145]"
  23. 230 printspc(12);:poke204,0
  24. 240 geta$:ifa$<>"b"anda$<>"d"goto240
  25. 250 ifa$="b"thenprint"[194]ildschirm.":dv=3:goto270
  26. 260 print"[196]rucker.":dv=4
  27. 270 print"                       [145]"
  28. 280 open1,0:print"[208]rogrammname: ";:input#1,na$:close1:print
  29. 290 open2,8,15:open1,8,2,na$+",p,r":gosub1290:gosub120:ifx=2049then310
  30. 300 print:print"[196]as [208]rogramm muss ab 2049 liegen.":goto1310
  31. 302 :
  32. 304 :
  33. 305 rem********************************
  34. 306 rem     pass 1 sprungtabelle
  35. 308 rem********************************
  36. 309 :
  37. 310 print"[147][208]ass 1 ([211]uchen der [211]pruenge)":pa=1
  38. 320 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$
  39. 330 gosub90:ifx=137orx=138orx=141orx=167thens1$="":goto360
  40. 340 ifx=0goto320
  41. 350 goto330
  42. 360 gosub90:ifx=32goto360
  43. 370 ifx>=48andx<=57thens1$=s1$+a$:goto360
  44. 380 ifs1$=""goto470
  45. 390 s1$=right$("      "+s1$,6)
  46. 400 ifleft$(sp$(sp),5)<>ze$thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  47. 410 iflen(sp$(sp))>70thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  48. 420 ifright$(sp$(sp),6)<>s1$thensp$(sp)=sp$(sp)+s1$
  49. 430 fori=1tops
  50. 440 ifleft$(ps$(i),6)<>s1$thennext:ps=i:gosub130:ps$(i)=s1$+":"
  51. 450 iflen(ps$(i))>70thennext:ps=ps+1:i=ps:gosub130:ps$(i)=s1$+":"
  52. 460 ifright$(ps$(i),5)<>ze$thenps$(i)=ps$(i)+" "+ze$
  53. 470 ifx=0goto320
  54. 480 ifx=44thens1$="":goto360
  55. 490 ifx=58orx>=127or(x>=65andx<=90)goto330
  56. 495 ifx=100then330
  57. 500 print:print"[198]ehler im [209]uellprogramm. [218]eile:"ze$:goto1310
  58. 502 :
  59. 504 :
  60. 506 rem -------------------------------
  61. 510 rem*** sortieren der sprungziele (feld ps$( ***
  62. 515 rem -------------------------------
  63. 516 :
  64. 520 fori=1tops
  65. 530 forj=itops
  66. 540 ifleft$(ps$(i),5)<left$(ps$(j),5)goto560
  67. 550 ps$(0)=ps$(i):ps$(i)=ps$(j):ps$(j)=ps$(0)
  68. 560 nextj
  69. 570 nexti
  70. 574 :
  71. 575 rem--------------------------------
  72. 576 rem   ausgabe spruenge + sprungziele
  73. 577 rem--------------------------------
  74. 578 :
  75. 580 open1,dv,7:print#1,"[208]rogrammname: "na$:print#1
  76. 590 print#1,"sprungtabelle           "
  77. 600 print#1,"--------------------------"
  78. 605 print#1,"zeile :   sprung auf zeile      ":print#1
  79. 610 fori=1tosp
  80. 620 ifleft$(sp$(i-1),5)=left$(sp$(i),5)thenprint#1,spc(7)mid$(sp$(i),7):goto640
  81. 630 print#1," "sp$(i)
  82. 640 nexti:print#1
  83. 645 print#1,"zeile :   wird angesprungen von":print#1
  84. 650 ps$(0)="":fori=2tops
  85. 660 ifleft$(ps$(i-1),6)<>left$(ps$(i),6)thenprint#1,ps$(i):goto680
  86. 670 print#1,spc(6);mid$(ps$(i),7)
  87. 680 nexti:close1
  88. 685 ifdv=4then712
  89. 690 print"[206][146]ochmals/[215][146]eiter"
  90. 700 geta$:ifa$<>"n"anda$<>"w"goto700
  91. 710 ifa$="n"goto580
  92. 712 :
  93. 714 :
  94. 715 rem********************************
  95. 716 rem     pass 2 variable suchen
  96. 718 rem********************************
  97. 719 :
  98. 720 print"[147][208]ass 2 ([211]uchen der [214]ariablen)"
  99. 730 open1,8,2,na$+",p,r":gosub1290:gosub120
  100. 740 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$:y=0
  101. 750 gosub90
  102. 760 ifx=0goto740
  103. 770 ifx=34orx=100orx=131orx=143goto800
  104. 780 ifx>64andx<91goto850
  105. 790 goto750
  106. 800 ifx=131theny=1
  107. 805 ifx=34theny=2
  108. 806 ifx=100theny=3
  109. 810 gosub90:ifx=0goto740
  110. 820 ifx=34andy=2goto750
  111. 830 ifx=58andy=1goto750
  112. 835 ify=3and(x=49orx=50orx=51)theny=0
  113. 836 ify=3goto750
  114. 840 goto810
  115. 850 v1$=a$
  116. 860 gosub90
  117. 870 ifx=36orx=37or(x>47andx<58)or(x>64andx<91)thenv1$=v1$+a$:goto860
  118. 880 ifx=40thenv1$=v1$+a$
  119. 890 v1$=left$(v1$+"    ",4)
  120. 900 fori=1tova
  121. 910 ifleft$(va$(i),4)<>v1$thennext:va=i:gosub130:va$(i)=v1$+"  :"
  122. 920 iflen(va$(i))>50thennext:va=va+1:i=va:gosub130:va$(i)=v1$+"  :"
  123. 930 ifright$(va$(i),5)<>ze$thenva$(i)=va$(i)+" "+ze$
  124. 940 ifx=0goto740
  125. 950 goto750
  126. 952 :
  127. 954 :
  128. 956 rem -------------------------------
  129. 960 rem *** sortieren der variablen (feld va$( ***
  130. 965 rem -------------------------------
  131. 968 :
  132. 970 fori=1tova
  133. 980 forj=itova
  134. 990 ifleft$(va$(i),4)>left$(va$(j),4)goto1010
  135. 1000 va$(0)=va$(i):va$(i)=va$(j):va$(j)=va$(0)
  136. 1010 nextj
  137. 1020 nexti:va=va-1:i=va
  138. 1025 :
  139. 1030 print"[147][215]ollen [211]ie zu den [214]ariablen":print"[194]emerkungen eingeben?  ";
  140. 1040 geta$:ifa$="n"goto1180
  141. 1050 ifa$<>"j"goto1040
  142. 1060 print"[202]a"
  143. 1070 print"[214]ariablenname: ";left$(va$(i),4)
  144. 1073 printle$
  145. 1075 iflen(va$(i))>70thenprint"[145][145]"right$(va$(i),25)
  146. 1080 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)anda$<>"e"goto1080
  147. 1090 ifa$="[145]"theni=i+1:ifi>vatheni=va
  148. 1100 ifa$=""theni=i-1:ifi<1theni=1
  149. 1105 ifa$="e"goto1180
  150. 1110 ifa$<>chr$(13)goto1070
  151. 1120 open1,0
  152. 1130 print"[212]ext:";:input#1,te$:print:close1:te$=left$(te$,25)
  153. 1135 print"[147]"le$
  154. 1160 va$(i)=left$(va$(i)+le$,55)+right$(le$+te$,25):goto1070
  155. 1174 ;
  156. 1175 rem-------------------------------
  157. 1176 rem     ausgabe variable
  158. 1177 rem-------------------------------
  159. 1180 print:open1,dv,7
  160. 1190 print#1,"liste der variablen     :"
  161. 1200 print#1,"-------------------------"
  162. 1210 fori=vato1step-1
  163. 1220 ifleft$(va$(i+1),4)<>left$(va$(i),4)thenprint#1,va$(i):goto1240
  164. 1230 print#1,spc(6);mid$(va$(i),7)
  165. 1240 nexti
  166. 1245 ifdv=4then1269
  167. 1250 print"n[146]ochmals/w[146]eiter"
  168. 1260 geta$:ifa$<>"n"anda$<>"w"goto1260
  169. 1263 ifa$="n"goto1190
  170. 1266 print"[214]ariablenliste ohne [218]eilennummer (j/n)"
  171. 1267 getr$:ifr$=""then1267
  172. 1268 ifr$<>"j"thenprint:print"ende":goto1310
  173. 1269 print#1:print#1:print#1,"[214]ariablenliste ohne [218]eilennummer"
  174. 1270 print#1,"-------------------------------"
  175. 1271 fori=vato1step-1
  176. 1272 iflen(va$(i))>70thenprint#1,left$(va$(i),8);right$(va$(i),25):goto1275
  177. 1273 ifleft$(va$(i+1),4)=left$(va$(i),4)then1275
  178. 1274 print#1,left$(va$(i),8)
  179. 1275 nexti
  180. 1280 goto1310
  181. 1290 input#2,a$,b$:ifa$="00"thenreturn
  182. 1300 print:print"[196]isk-[197]rror: ";b$
  183. 1310 close1:close2:end
  184.